/**
 * <p>Package : org.tea.springdata.mongdb.domain</p>
 * <p>E-Mail : ztlyde@gmail.com</p>
 */
package org.tea.springdata.mongdb.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author: John zhang
 * @version: 0.1
 */
@Document(collection = "account")
public class Account {
	
	@Id
	private String id;
	@Indexed(unique = true)
	private String username;
	private String password;
	private long lastLoginTime;
	
	public Account(String username, String password) {
		this.username = username;
		this.password = password;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public long getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(long lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

}
